{literal}
    <script type='text/javascript'>
        $(function() {
            
            $('#version').keyup(function(){
                action = $(this).parent().attr('action');
                    action += $(this).val();console.log(action);
               // cleanUrl(action);
            });
            //nettoyer url
            function cleanUrl(_url){
                var urlClean = $('#cleanUrl').val();
                $.post(urlClean,{url:_url}, function(result){
                    $('.form_version').attr('action',result);
                });
            }
        });
    </script>
{/literal}
<div id="rechLeft">
    <div class="wrap">
        <div class="ma_recherche">
            <span>Ma recherche</span>
            <input type="hidden" id="cleanUrl"  value="{jurl 'accueil~FoHome:ajaxCleanUrl', array(), false}">
            {if $critereOk}
                {if $sessionCritere->marque}
                <div class="block">
                    <strong>{$sessionCritere->marque}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'mrk')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->modele}
                <div class="block">
                    <strong>{$sessionCritere->modele}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'mod')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->version}
                <div class="block">
                    <strong>{$sessionCritere->version}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'ver')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->cat}
                <div class="block">
                    <strong>{$sessionCritere->cat}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'cat')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->carbu}
                <div class="block">
                    <strong>{$sessionCritere->carbu}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'carbu')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->porte}
                <div class="block">
                    <strong>{$sessionCritere->porte} portes</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'porte')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->annee}
                <div class="block">
                    <strong>{$sessionCritere->annee}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'annee')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->km}
                <div class="block">
                    <strong>{$sessionCritere->km} km</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'km')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->vitesse}
                <div class="block">
                    <strong>{$sessionCritere->vitesse}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'vitesse')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->vendeur}
                <div class="block">
                    <strong>{$sessionCritere->vendeur}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'vendeur')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if sizeof($sessionCritere->motCleUrne)}
                    {foreach $sessionCritere->motCleUrne as $j=>$val}
                        <div class="block cochon">
                            <strong>{$val}</strong>
                            <a href="{jurl 'recherche~FoRecherche:index', array('urn'=>$j)}" class="close" title="Fermer">&nbsp;</a>
                        </div>
                    {/foreach}
                {elseif $sessionCritere->motcle}
                <div class="block">
                    <strong>{$sessionCritere->motcle}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'motcle')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->image}
                <div class="block">
                    <strong>Avec image</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'image')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->video}
                <div class="block">
                    <strong>Avec video</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'video')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->main}
                <div class="block">
                    <strong>Avec 1ère main</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'main')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->garantie}
                <div class="block">
                    <strong>Avec garantie</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'garantie')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->ville}
                <div class="block">
                    <strong style="font-size:0.9em;width:160px;"> {$sessionCritere->ville}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'ville')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->region}
                <div class="block">
                    <strong style="font-size:0.9em;width:160px;">{$sessionCritere->region}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'region')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}
                {if $sessionCritere->dept && !($sessionCritere->localisation)}
                <div class="block">
                    <strong style="font-size:0.9em;width:160px;">{$sessionCritere->departement}</strong>
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'dept')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}

                {if $sessionCritere->localisation}
                <div class="block">
                    {if $sessionCritere->localisation == 1}
                        <strong> Département : {$sessionCritere->dept}</strong>
                    {else}
                         <strong>+ dépts. limitrophes</strong>
                    {/if}
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'localisation')}" class="close" title="Fermer">&nbsp;</a>
                </div>
                {/if}

                <!-- Effacer les critères-->
                <div style="font-size:0.9em;margin:10px 30px;">
                    <img src="{$j_basepath}design/front/images/delete_small.gif">
                    <a href="{jurl 'recherche~FoRecherche:index', array('clean'=>'all')}" style="position:relative;top:-3px;color:#7C7C7C">Effacer tous les critères</a>
                </div>
           {/if}
        </div>
        {if !$sessionCritere->marque}
        <div class="marques">
            <h3>Marques</h3>
            <a href="#" class="show_all_list">Plus de marques &gt;&gt;</a>
            <a href="#" class="show_recent_only">&lt;&lt; Les principales</a>
        <ul class="filter_list"> 
            {foreach $allMarque as $item}
                {if $item->marque_id != $marque->marque_id}
                    <li><a href="{jurl 'recherche~FoRecherche:index', array('marque'=>$item->marque_id)}">{$item->marque_libelle}</a></li>
                {/if}
            {/foreach}
        </ul>
        </div>
        {/if}
        {if !$sessionCritere->modele && $sessionCritere->marque}
        <div class="marques">
            <h3>Modèles</h3>
            <a href="#" class="show_recent_only_mod" style="display:none;">&lt;&lt; Les principales</a>
        <ul class=""> 
            {foreach $modele as $item}
                    <li><a href="{jurl 'recherche~FoRecherche:index', array('modele'=>$item->modele_id)}">{$item->modele_libelle}</a></li>
            {/foreach}
        </ul>
        </div>
        {/if}
        {if !$sessionCritere->version}
        <div class="version_finition_couleur">
            <h3>Version</h3>
            <div class="wrap2">
                <form action="{jurl 'recherche~FoRecherche:index'}" method="post"  class='form_version'>
                    <input type="text" name="version" id="version" /><input class="go" type="submit" title="Go" value="" />
                </form>
            </div>
        </div>
        {/if}
        {if !$sessionCritere->cat}
        <div class="marques">
            <h3>Catégories</h3>
        <ul class="filter_list_mod_cat"> 
            {foreach $categorie as $itemCat}
                    <li><a href="{jurl 'recherche~FoRecherche:index', array('cat'=>$itemCat->catV_id)}">{$itemCat->catV_zLibelle}</a></li>
            {/foreach}
        </ul>
        </div>
        {/if}
        {if !$sessionCritere->carbu}
        <div class="motorisation">
            <h3>Carburation</h3>
            <div class="wrap2">
                <a href="{jurl 'recherche~FoRecherche:index', array('carbu'=>1)}">Essence</a>
                <a href="{jurl 'recherche~FoRecherche:index', array('carbu'=>2)}">Diesel</a>
                <a href="{jurl 'recherche~FoRecherche:index', array('carbu'=>3)}">GPL</a>
                <a href="{jurl 'recherche~FoRecherche:index', array('carbu'=>4)}">Electrique</a>
                <a class="last" href="{jurl 'recherche~FoRecherche:index', array('carbu'=>5)}">BioEthanol</a>
            </div>
        </div>
        {/if}
        {if !$sessionCritere->porte}
        <div class="version_finition_couleur">
            <h3>Nombre de portes</h3>
            <div class="wrap2">
                <form action="{jurl 'recherche~FoRecherche:index'}" method="post">
                    <select name="porte" style="width:100pt">
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                    </select>
                    <input class="go" type="submit" title="Go" value="" />
                </form>
            </div>
        </div>
        {/if}
        {if !$sessionCritere->annee}
        <div class="version_finition_couleur">
            <h3>Années</h3>
            <div class="wrap2">
            <form action="{jurl 'recherche~FoRecherche:index'}" method="post">
                <input type="text" name="annee" id="annee"/><input class="go" type="submit" title="Go" value="" />
            </form>
            </div>
        </div>
        {/if}
        {if !$sessionCritere->km}
        <div class="version_finition_couleur">
            <h3>Kilométrage</h3>
            <div class="wrap2">
            <form action="{jurl 'recherche~FoRecherche:index'}" method="post">
                <input type="text" name="km" id="km"/><input class="go" type="submit" title="Go" value="" />
            </form>
            </div>
        </div>
        {/if}
        {if !$sessionCritere->vitesse}

        <div class="motorisation">
            <h3>Boîte de vitesse</h3>
            <div class="wrap2">
                {foreach $boiteVitesse as $itemVitesse}
                    <a href="{jurl 'recherche~FoRecherche:index', array('vitesse'=>$itemVitesse->id)}">{$itemVitesse->name}</a>
                {/foreach}
            </div>
        </div>
        {/if}
        {if !$sessionCritere->localisation}
        <div class="localisation">
            <h3>Localisation</h3>
            <div class="wrap2">
                <form action="{jurl 'recherche~FoRecherche:index'}" method="post">
                    <div class="rows"><input type="radio" name="localisation" value="1" {if $sessionCritere->localisation == 1}CHECKED{/if} /> <label>Département : </label><input type="text" name="dept" value="{$sessionCritere->dept}"/><span>(ex : 44)</span></div>
                    <div class="rows"><input type="radio" name="localisation" value="2" {if $sessionCritere->localisation == 2}CHECKED{/if} /> <label>+ départements limitrophes</label></div>
                    <input class="go" type="submit" title="Go" value="" />
                </form>
            </div>
        </div>
       {/if}
       {if !$sessionCritere->vendeur}

        <div class="type_annonceur">
            <h3>Type de vendeur</h3>
            <div class="wrap2">
            <a href="{jurl 'recherche~FoRecherche:index', array('vendeur'=>1)}">Les particuliers</a>
            <a class="last" href="{jurl 'recherche~FoRecherche:index', array('vendeur'=>2)}">Les pros</a>
            </div>
        </div>
        {/if}
        {if $autresCritereExiste}
          <div class="localisation">
            <h3>Autres critères</h3>
            <div class="wrap2">
            <form action="{jurl 'recherche~FoRecherche:index'}" method="post">
                {if !$sessionCritere->image}
                <div class="rows"><label class="lb">Image : </label><input type="checkbox" name="image" id="image" class="chk2" {if $sessionCritere->image}CHECKED{/if}/></div>
                {/if}
                {if !$sessionCritere->video}
                <div class="rows"><label class="lb">Vidéo : </label><input type="checkbox" name="video" id="video" class="chk2" {if $sessionCritere->video}CHECKED{/if} /></div>
                {/if}
                {if !$sessionCritere->main}
                <div class="rows"><label class="lb">1ère main : </label><input type="checkbox" name="main" id="main" class="chk2" {if $sessionCritere->main}CHECKED{/if} /></div>
                {/if}
                {if !$sessionCritere->garantie}
                <div class="rows"><label class="lb">Garantie : </label><input type="checkbox" name="garantie" id="garantie" class="chk2" {if $sessionCritere->garantie}CHECKED{/if} /></div>
                {/if}
                <input class="go" type="submit" title="Go" value="" />
            </form>
            </div>
        </div>
        {/if}
        {if ($nuageDeTag)}
            <div class="nuage_tags">
                <h3>Nuage de versions</h3>
                <div class="wrap2">
                    {$nuageDeTag}
                </div>
                <div class="deco"><img alt="" src="{$j_basepath}design/front/images/bg10.gif" title="" /><br /></div>
            </div>
        {/if}
        
    </div>
    <input type="hidden" name="urlCloud" id="urlCloud" value="{jurl 'recherche~FoRecherche:geturlCloud'}" />
</div>
{literal}
    <style type="text/css">
        .chk2 {float:right;margin-right:0px;}
    </style>
    <script type="text/javascript">
        $(".filter_list_mod li").css('display','block') ;
    </script>
{/literal}